home *** CD-ROM | disk | FTP | other *** search
/ IRIX Base Documentation 2001 May / SGI IRIX Base Documentation 2001 May.iso / usr / share / catman / p_man / cat3c / putenv.z / putenv
Encoding:
Text File  |  1998-10-20  |  3.1 KB  |  67 lines

  1.  
  2.  
  3.  
  4. ppppuuuutttteeeennnnvvvv((((3333CCCC))))                                                          ppppuuuutttteeeennnnvvvv((((3333CCCC))))
  5.  
  6.  
  7.  
  8. NNNNAAAAMMMMEEEE
  9.      _pppp_uuuu_tttt_eeee_nnnn_vvvv - change or add value to environment
  10.  
  11. SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS
  12.      _####_iiii_nnnn_cccc_llll_uuuu_dddd_eeee _<<<<_ssss_tttt_dddd_llll_iiii_bbbb_...._hhhh_>>>>
  13.  
  14.      _iiii_nnnn_tttt _pppp_uuuu_tttt_eeee_nnnn_vvvv _((((_cccc_hhhh_aaaa_rrrr _****_ssss_tttt_rrrr_iiii_nnnn_gggg_))))_;;;;
  15.  
  16. DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
  17.      _s_t_r_i_n_g points to a string of the form ``_n_a_m_e_====_v_a_l_u_e.''  _pppp_uuuu_tttt_eeee_nnnn_vvvv makes the
  18.      value of the environment variable _n_a_m_e equal to _v_a_l_u_e by altering an
  19.      existing variable or creating a new one.  In either case, the string
  20.      pointed to by _s_t_r_i_n_g becomes part of the environment, so altering the
  21.      string will change the environment.  The space used by _s_t_r_i_n_g is no
  22.      longer used once a new string-defining _n_a_m_e is passed to _pppp_uuuu_tttt_eeee_nnnn_vvvv.  Because
  23.      of this limitation, _s_t_r_i_n_g should be declared static if it is declared
  24.      within a function.
  25.  
  26. SSSSEEEEEEEE AAAALLLLSSSSOOOO
  27.      _eeee_xxxx_eeee_cccc(2), _gggg_eeee_tttt_eeee_nnnn_vvvv(3C), _mmmm_aaaa_llll_llll_oooo_cccc(3C), _eeee_nnnn_vvvv_iiii_rrrr_oooo_nnnn(5).
  28.  
  29. DDDDIIIIAAAAGGGGNNNNOOOOSSSSTTTTIIIICCCCSSSS
  30.      _pppp_uuuu_tttt_eeee_nnnn_vvvv returns non-zero if it was unable to obtain enough space via
  31.      _mmmm_aaaa_llll_llll_oooo_cccc for an expanded environment, otherwise zero.
  32.  
  33. WWWWAAAARRRRNNNNIIIINNNNGGGGSSSS
  34.      _pppp_uuuu_tttt_eeee_nnnn_vvvv manipulates the environment pointed to by _e_n_v_i_r_o_n_,,,, and can be used
  35.      in conjunction with _gggg_eeee_tttt_eeee_nnnn_vvvv.  However, _e_n_v_p (the third argument to _m_a_i_n)
  36.      is not changed.
  37.      This routine uses _mmmm_aaaa_llll_llll_oooo_cccc(3C) to enlarge the environment.
  38.      After _pppp_uuuu_tttt_eeee_nnnn_vvvv is called, environmental variables are not in alphabetical
  39.      order.  A potential error is to call the function _pppp_uuuu_tttt_eeee_nnnn_vvvv with a pointer
  40.      to an automatic variable as the argument and to then exit the calling
  41.      function while _s_t_r_i_n_g is still part of the environment.
  42.  
  43.  
  44.  
  45.  
  46.  
  47.  
  48.  
  49.  
  50.  
  51.  
  52.  
  53.  
  54.  
  55.  
  56.  
  57.  
  58.  
  59.  
  60.  
  61.  
  62.  
  63.                                                                         PPPPaaaaggggeeee 1111
  64.  
  65.  
  66.  
  67.